<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport"
		content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<title>黔东南州民爆行业公共服务平台</title>
	<meta name="keywords" content="网站关键字1,网站关键字2,网站关键字3,网站关键字4,网站关键字5">
	<meta name="description" content="本网站简介">
	<link rel="shortcut icon" href="../../../static/images/favicon.ico">
	<link rel="stylesheet" href="../../../static/js/lib/layui/css/layui.css" />
	<link rel="stylesheet" href="../../../static/css/global.css" />
	<link rel="stylesheet" href="../../../static/css/layout.css" />
	<link rel="stylesheet"
		href="../../../static/js/lib/customScrollbar/mCustomScrollbar.css" />

	<script src="../hplus/js/jquery.min.js"></script>
	<script src="../hplus/js/plugins/layer/layer.min.js"></script>
	<script type="text/javascript"
		src="http://api.map.baidu.com/api?v=2.0&ak=kx0ZqRGusckdkCjO1NQxi4qsQjEVlwXc"></script>
	<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
	<script src="../../../../hplus/js/jquery.min.js"></script>
	<script src="../../../../hplus/js/plugins/layer/layer.min.js"></script>
<style type="text/css">
body, html, #allmap {
	width: 100%;
	height: 100%;
	overflow: hidden;
	margin: 0;
	font-family: "微软雅黑";
}
.BMap_cpyCtrl {
            display: none;
        }
        .anchorBL {
            display: none;
        }
#l-map {
	height: 100%;
	width: 78%;
	float: left;
	border-right: 2px solid #bcbcbc;
}

#r-result {
	height: 100%;
	width: 20%;
	float: left;
}
</style>
	
</head>
<body style="position: relative; height: 100vh;">
	<div class="sidebar">
		<ul>
			<li class="current"><a href="demo.html"><i
					class="layui-icon layui-icon-home"></i>
				<p>首页</p></a></li>
			<li><a href="../../../../publicSecurity/gonganHome.html"><i
					class="layui-icon layui-icon-set"></i>
				<p>安全监管</p></a></li>
			<li><a href="#"><i class="layui-icon layui-icon-video"></i>
				<p>现场视频</p></a></li>
		</ul>
	</div>
	<div class="fly-header clearBoth pl-20 pr-20"
		style="opacity: .8; height: 50px;">
		<a href="logo.html" class="logo fl" style="line-height: 50px;"> <img
			src="../../../static/images/nationalEmblem.png" style="width: 30px;">
			<span style="font-size: 20px;">黔东南州民爆行业公共服务云平台</span>
		</a>
		<div class="fr fly-header-msg" style="top: 16px; right: 170px;">
			<span>2018-11-11<span>星期天</span></span> <span>多云：<span>微风0级</span><span>22℃</span></span>
			<span>本月登录：<span>12次</span></span> <span>本月登录时长：<span>20小时</span></span>
		</div>
		<ul class="loginbar login-info" style="top: 9px; line-height: 30px;">
			<li id="userInfoBox" class="layui-nav-item userNameBox"><a
				href="#"><img
					src="../../../static/images/index/Homepage-onthedayofconstructionpersonnel.png"
					style="width: 30px; height: 30px;" /></a></li>
			<li id="logoutBtn" class="extBtn" data-toggle="logout"><a
				onclick="loginout()">退出登录</a></li>
		</ul>
		<ul class="loginbar islogin layui-hide"
			style="top: 9px; line-height: 30px;">
			<li id="loginBtn" data-toggle="login"
				class="layui-nav-item login-btn" type="login"><a
				href="javascript:;">登陆</a></li>
			<li id="regBtn" class="layui-nav-item login-btn" type="reg"><a
				href="http://qaaccount.915dj.com/reg/person">注册</a></li>
		</ul>
	</div>
	<!-- 顶部筛选和搜索 -->
	<div class="filter-bar mb-30 clearBoth"
		style="position: absolute; top: 60px; left: 90px; right: 10px; width: inherit; z-index: 122;">
		<div class="title">选择图层：</div>
		<div class="filter-scroll">
			<div class="filter-item-box">
				<a class="filter-item " href="demo.html"> <span><span>首页</span></span>
				</a> <a class="filter-item current"> <span><span>爆破项目</span></span>
				</a> <a class="filter-item" href="Location.html"> <span><span>民爆库房</span></span>
				</a> <a class="filter-item" href="Location.html"> <span><span>工程技术人员</span></span>
				</a> <a class="filter-item" href="Location.html"> <span><span>爆破员</span></span>
				</a> <a class="filter-item" href="Location.html"> <span><span>安全员</span></span>
				</a> <a class="filter-item" href="Location.html"> <span><span>保管员</span></span>
				</a> <a class="filter-item" href="Location.html"> <span><span>危险地图</span></span>
				</a>
			</div>
		</div>
		<div class="search-box">
			<img src="../../../static/images/tongji1-sousuoanniu.png" /> <input
				type="text" placeholder="输入关键字搜索" class="layui-input" />
		</div>
		<div id="rs-result" style="margin-right: -20px; margin-top: 0px;">
			<div class="optionpanel">
				<label style="color: #fff">主题</label> <select id="stylelist"
					onchange="changeMapStyle(this.value)"></select>
			</div>
		</div>
	</div>
	<div class="wrapper"
		style="position: absolute; top: 0; left: 0; right: 0; bottom: 0;">
		<div class="location-box">
			<div id="location-map"></div>
		</div>
	</div>

	<!-- <script type="text/javascript" src="../static/js/lib/layui/layui.js" ></script>
		<script type="text/javascript" src="http://api.map.baidu.com/library/AreaRestriction/1.2/src/AreaRestriction_min.js"></script>
		<script>
			layui.config({
				version: "1.0.0",
				base: '../static/js/modes/' // 建议改成绝对路径
			}).use(['jquery'], function (){
				var $ = layui.jquery;
				// 百度地图API功能
				var map = new BMap.Map("location-map");
				map.centerAndZoom(new BMap.Point(107.975353, 26.583992), 14);
				map.enableScrollWheelZoom(true);
				//map.addControl(new BMap.NavigationControl({type:BMAP_ANCHOR_BOTTOM_RIGHT}));        // 添加平移缩放控件
				map.addControl(new BMap.ScaleControl({type:BMAP_ANCHOR_BOTTOM_RIGHT}));             // 添加比例尺控件
				map.addControl(new BMap.OverviewMapControl({type:BMAP_ANCHOR_BOTTOM_RIGHT}));       //添加缩略地图控件
				
				// 设置地图皮肤
				changeMapStyle('midnight')
				function changeMapStyle(style){
		        	map.setMapStyle({style:style});
		    	}
				
				var index = 0;
				var myGeo = new BMap.Geocoder();
				var adds = [
					new BMap.Point(107.97, 26.58),
					new BMap.Point(107.97, 26.57),
					new BMap.Point(107.97, 26.56),
					new BMap.Point(107.98, 26.59),
					new BMap.Point(107.99, 26.56),
					
					new BMap.Point(107.96, 26.57),
					new BMap.Point(107.98, 26.66),
					new BMap.Point(107.95, 26.59),
					new BMap.Point(107.95, 26.50),
					
					new BMap.Point(108.00, 26.58),
					new BMap.Point(107.97, 26.59),
					new BMap.Point(107.97, 26.60),
					new BMap.Point(107.97, 26.68),
					new BMap.Point(109.161125, 26.32655),
					new BMap.Point(107.89861, 26.531537),
					new BMap.Point(108.179169, 26.499467),
					new BMap.Point(108.328647, 27.0465),
					new BMap.Point(109.178318, 26.929808)
				];
				for(var i = 0; i<adds.length; i++){
					var marker = new BMap.Marker(adds[i]);
					map.addOverlay(marker);
					geocodeSearch(adds[i], marker);
				}
				// 得到地名
				function geocodeSearch(pt, marker) {
					var str = "";
					myGeo.getLocation(pt, function(rs){
						var addComp = rs.addressComponents;
						str += addComp.province+addComp.city+addComp.district+addComp.street+addComp.streetNumber
						//console.log("地址：" + addComp.province + ", " + addComp.city + ", " + addComp.district + ", " + addComp.street + ", " + addComp.streetNumber + "");
						createTag(marker, str);
					});
				}
				
				function createTag(marker, str) {
					//标注
				    var text = "<p>地址：</p><p style='text-indent: 2em;color: #ed2d2d;'>" + str + "</p>";
					 var label = new BMap.Label(text, {
				        offset : new BMap.Size(-85, -120)
				    });
				    //设置label(标注的样式)
				    /*label.setStyle({
				        color : "#666666",
				        fontSize : "12px",
				        height : "110px",
				        //lineHeight : "20px",
				        fontFamily : "微软雅黑",
				        maxWidth : "none",
				        border : "none",
				        display:"none"
				    });
				    marker.setLabel(label); */
					//给标记添加点击事件以及显示窗口信息
				    var infoWindow = new BMap.InfoWindow(text);
				    marker.addEventListener("click", function () { this.openInfoWindow(infoWindow); });
				}
			});
		</script> -->

	<script type="text/javascript"
		src="http://lbsyun.baidu.com/custom/stylelist.js"></script>
	<script type="text/javascript">
			//初始化模板选择的下拉框
			var sel = document.getElementById('stylelist');
			for(var key in mapstyles){
				var style = mapstyles[key];
				var item = new  Option(style.title,key);
				sel.options.add(item);
			}
			var map = new BMap.Map("location-map");
			var point = new BMap.Point(107.975353, 26.583992);

		//	map.addControl(new BMap.NavigationControl());               // 添加平移缩放控件
			map.addControl(new BMap.ScaleControl());                    // 添加比例尺控件
			map.addControl(new BMap.OverviewMapControl());              //添加缩略地图控件
			map.enableScrollWheelZoom();                            //启用滚轮放大缩小
		//	map.addControl(new BMap.MapTypeControl());          //添加地图类型控件
			map.centerAndZoom(point, 13); 


			changeMapStyle('midnight')
			sel.value = 'midnight';

			function changeMapStyle(style){
				map.setMapStyle({style:style});
				$('#desc').html(mapstyles[style].desc);
			}
			
			
			// 编写自定义函数,创建标注
			function addMarker(point){
			  var marker = new BMap.Marker(point);
			  map.addOverlay(marker);
			}
			// 随机向地图添加25个标注
			var bounds = map.getBounds();
			var sw = bounds.getSouthWest();
			var ne = bounds.getNorthEast();
			var lngSpan = Math.abs(sw.lng - ne.lng);
			var latSpan = Math.abs(ne.lat - sw.lat);
			for (var i = 0; i < 25; i ++) {
				var point = new BMap.Point(sw.lng + lngSpan * (Math.random() * 0.7), ne.lat - latSpan * (Math.random() * 0.7));
				addMarker(point);
			}
			
			// 得到地名
			function geocodeSearch(pt, marker) {
				var str = "";
				myGeo.getLocation(pt, function(rs){
					var addComp = rs.addressComponents;
					str += addComp.province+addComp.city+addComp.district+addComp.street+addComp.streetNumber
					//console.log("地址：" + addComp.province + ", " + addComp.city + ", " + addComp.district + ", " + addComp.street + ", " + addComp.streetNumber + "");
					createTag(marker, str);
				});
			}
			
			function createTag(marker, str) {
				//标注
			    var text = "<p>地址：</p><p style='text-indent: 2em;color: #ed2d2d;'>" + str + "</p>";
				 var label = new BMap.Label(text, {
			        offset : new BMap.Size(-85, -120)
			    });
			    //设置label(标注的样式)
			    /*label.setStyle({
			        color : "#666666",
			        fontSize : "12px",
			        height : "110px",
			        //lineHeight : "20px",
			        fontFamily : "微软雅黑",
			        maxWidth : "none",
			        border : "none",
			        display:"none"
			    });
			    marker.setLabel(label); */
				//给标记添加点击事件以及显示窗口信息
			    var infoWindow = new BMap.InfoWindow(text);
			    marker.addEventListener("click", function () { this.openInfoWindow(infoWindow); });
			}
		</script>
	<script type="text/javascript">
		function loginout(){
			parent.layer.confirm("您确定要退出系统吗?", {
			    btn: ['确定','取消'], //按钮
			    shade: true, //不显示遮罩
			    shadeClose: true,
		        shade: 0.5,
			}, function(){
				top.location.href = '/blast/user/loginout';
			}, function(){
			    
			});
		}
		</script>
</body>
</html>
